#pragma once

#include "Serializable.h"
#include "Vectors.h"
#include "StlStringAndStreams.h"

class ServiceProvider;
class ZStream;

class UserManager : public Serializable
{
public:
	explicit UserManager(ServiceProvider* const i_sp);
	~UserManager();

	void Clear();
	
	void AddUser(const STL::string &i_name);
	UsersList& GetUserList();
	const UsersList& GetUserList() const;
	void CheckLosingPlayers();
	STL::vector<STL::string> m_gameoverNames;

	virtual	ZStream& Serialize(ZStream& o_stream) const;
	virtual ZStream& Deserialize(ZStream& i_stream);

private:
	ServiceProvider* m_sp;
	UsersList m_list;
};
